﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="addNew.aspx.vb" Inherits="DusanProject.addNew" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    


<asp:Table ID="tbl_Add" CssClass="addTable" runat="server" BorderColor="Black"  
        Width="600px" Height="390px" BorderStyle="Dotted" BorderWidth="1px" 
        CellPadding="0" CellSpacing="5">

<asp:TableRow >
    <asp:TableHeaderCell ColumnSpan="2"><asp:Label class="add2" ID="lblAdd" runat="server"><h2>Add new Picture</h2></asp:Label></asp:TableHeaderCell>
</asp:TableRow>

<asp:TableRow >
    <asp:TableCell>
        <asp:Label class="add2" ID="lbl_Name" runat="server" Text="Picture Name:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:TextBox ID="tb_PictureName" runat="server"></asp:TextBox>&nbsp;&nbsp
        <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_PictureName" runat="server" ErrorMessage="Picture Name is Required" ControlToValidate="tb_PictureName"></asp:RequiredFieldValidator>
    </asp:TableCell>
</asp:TableRow>

<asp:TableRow>
    <asp:TableCell>
        <asp:Label class="add3" ID="lbl_Description" runat="server" Text="Description:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:TextBox ID="tb_Description" runat="server"></asp:TextBox>&nbsp;&nbsp
        <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_Description" runat="server" ErrorMessage="Description is Required" ControlToValidate="tb_Description"></asp:RequiredFieldValidator>
    </asp:TableCell>
</asp:TableRow>

<asp:TableRow>
    <asp:TableCell>
        <asp:Label class="add3" ID="lblDetails" runat="server" Text="Details:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:TextBox ID="tb_Details" runat="server" Rows="10" TextMode="MultiLine"></asp:TextBox>&nbsp;&nbsp
        <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_details" runat="server" ErrorMessage="Details is Required" ControlToValidate="tb_Details"></asp:RequiredFieldValidator>
    </asp:TableCell>
</asp:TableRow>

<asp:TableRow>
    <asp:TableCell>
        <asp:Label class="add3" ID="lblLocation" runat="server" Text="Location:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:TextBox ID="tb_Location" runat="server" Width="200" Rows="10"></asp:TextBox>&nbsp;&nbsp
        <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_Location" runat="server" ErrorMessage="Location is Required" ControlToValidate="tb_Location"></asp:RequiredFieldValidator>
    </asp:TableCell>
</asp:TableRow>


<asp:TableRow>
    <asp:TableCell>
        <asp:Label class="add4" ID="lbl_YearTaken" runat="server" Text="Year Taken:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:TextBox ID="tb_YearTaken" runat="server"></asp:TextBox>&nbsp;&nbsp
         <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_YearTaken" runat="server" ErrorMessage="Year taken is Required" ControlToValidate="tb_YearTaken"></asp:RequiredFieldValidator>
         <asp:RangeValidator ForeColor="Red" ValidationGroup="A" ID="rv_YearTaken2" runat="server" ErrorMessage="Entered year is not correct" MaximumValue="2014" MinimumValue="1800" ControlToValidate="tb_YearTaken"></asp:RangeValidator>

           </asp:TableCell>
</asp:TableRow>

<asp:TableRow>
    <asp:TableCell>
        <asp:Label class="add5" ID="lbl_Picture" runat="server" Text="Picture:"></asp:Label>
    </asp:TableCell> 
    <asp:TableCell>
        <asp:FileUpload ID="fu_Picture" runat="server" />&nbsp;&nbsp
               <asp:RequiredFieldValidator ForeColor="Red" ValidationGroup="A" ID="rv_Picture" runat="server" ErrorMessage="Picture is Required" ControlToValidate="fu_Picture"></asp:RequiredFieldValidator>
    </asp:TableCell>
</asp:TableRow>

<asp:TableFooterRow>
    <asp:TableCell ColumnSpan = "2" CssClass="center">
        <asp:Button ValidationGroup="A" ID="btnAddNew" runat="server" Text="Add New" />
    </asp:TableCell>
</asp:TableFooterRow>
</asp:Table>


</asp:Content>
